<#compress>
    <@override name="title">餐桌类型</@override>
    <@override name="viewcss">
    <link href="${ctx}/static/scripts/plugins/bootstrap-modal/css/bootstrap-modal-bs3patch.css" rel="stylesheet" type="text/css"/>
    <link href="${ctx}/static/scripts/plugins/bootstrap-modal/css/bootstrap-modal.css" rel="stylesheet" type="text/css"/>
    </@override>
    <@override name="viewbody">
    <div class="row">
        <div class="col-md-12">
            <h3 class="page-title">
                预定数量管理
                <small>预定数量维护.</small>
            </h3>
            <ul class="page-breadcrumb breadcrumb">
                <li>
                    <i class="fa fa-home"></i>
                    <a href="${ctx}/admin/home">
                        首页
                    </a>
                    <i class="fa fa-angle-right"></i>
                </li>
                <li>
                    <a href="${ctx}/admin/booking/dining">
                        餐饮品牌
                    </a>
                    <i class="fa fa-angle-right"></i>
                </li>
                <li>
                    <a href="#">${brand.name!}品牌餐饮－预定数量管理 </a>
                </li>
            </ul>
        </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            <div class="portlet box grey">
                <div class="portlet-title">
                    <div class="caption">
                        <i class="fa fa-reorder"></i>${brand.name!}的 预定数量管理
                    </div>
                </div>
                <div class="portlet-body">
                    <form action="${ctx}/admin/booking/dining/num_save" method="post" class="form-horizontal form-bordered">
                        <div class="form-body">
                            <#list group_items.keySet() as key>
                                <h3 class="form-section">${key}</h3>
                                <#assign num=group_items[key] >

                                <input type="hidden" name="brand" value="${num.brand!}">
                                <input type="hidden" name="id" value="${num.id!}">
                                <input type="hidden" name="catetory" value="${num.catetory!}">
                                <div class="form-group">
                                    <label class="control-label col-md-4" for="num_${key_index}">开放预定数量</label>

                                    <div class="col-md-8">
                                        <div  class="spinner">
                                            <div class="input-group" style="width:150px;">
                                                <div class="spinner-buttons input-group-btn">
                                                    <button type="button" class="btn spinner-up blue">
                                                        <i class="fa fa-plus"></i>
                                                    </button>
                                                </div>
                                                <input type="text" class="spinner-input form-control" id="num_${key_index}" value="${num.num!}" name="num" maxlength="3" readonly>
                                                <div class="spinner-buttons input-group-btn">
                                                    <button type="button" class="btn spinner-down red">
                                                        <i class="fa fa-minus"></i>
                                                    </button>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </#list>
                        </div>
                        <div class="form-actions fluid">
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="col-md-offset-3 col-md-9">
                                        <button type="submit" class="btn purple"><i class="fa fa-check"></i> 保存</button>
                                        <a href="${ctx}/admin/booking/dining" class="btn default"> <i class="fa  fa-arrow-circle-o-left"></i>返回</a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>

                </div>
            </div>
        </div>
    </div>
    </@override>

    <@override name="viewparams">
    g.brand = '${brand.id!}';
    </@override>
    <@override name="viewmodule">dining_nums</@override>
    <@extends name="../../_basic/main.ftl"></@extends>
</#compress>